<html>
<head><meta charset="utf-8"><title>Cargo.toml completion and formatting · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html">Cargo.toml completion and formatting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214327512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214327512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iulian Gabriel Radu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214327512">(Oct 23 2020 at 15:25)</a>:</h4>
<p>Hello, totally not sure if it's the right place to ask, but is Cargo.toml completion and formatting a goal of Rust Analyzer? If so, there's a issue that I can track or contribute to? I'm talking about code completion for sections, keys (maybe with docs/links to Cargo reference, e.g. <a href="https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-name-field">https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-name-field</a>) and similar nice to have features. I think IntelliJ Plugin has something similar. Thanks!</p>
<p>Edit: To be even more clear, I'm not talking about generic TOML support. Something more specialized than that.</p>



<a name="214327687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214327687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214327687">(Oct 23 2020 at 15:27)</a>:</h4>
<p>It is a goal, but a long term one</p>



<a name="214327712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214327712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214327712">(Oct 23 2020 at 15:27)</a>:</h4>
<p>to do this, we'll need make <a href="https://github.com/matklad/tom">https://github.com/matklad/tom</a> or an equivalent production ready</p>



<a name="214328171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iulian Gabriel Radu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328171">(Oct 23 2020 at 15:31)</a>:</h4>
<p>I see. Is the status still accurate? Rowan rewrite still in progress?</p>



<a name="214328395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328395">(Oct 23 2020 at 15:32)</a>:</h4>
<p>Probably not, I haven't looked at that code for quite some time</p>



<a name="214328472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iulian Gabriel Radu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328472">(Oct 23 2020 at 15:33)</a>:</h4>
<p>So what would be the next step for matklad/tom then? <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="214328564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328564">(Oct 23 2020 at 15:34)</a>:</h4>
<p>Upgrade it to modern rowan, make sure that the API makes sense</p>



<a name="214328595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328595">(Oct 23 2020 at 15:34)</a>:</h4>
<p>Design, whether the API should expose rowan directly or not</p>



<a name="214328640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214328640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214328640">(Oct 23 2020 at 15:34)</a>:</h4>
<p>Design, where there should be a separate cargo.toml language server, or whether rust-analyzer should use tom as a library</p>



<a name="214329119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214329119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iulian Gabriel Radu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214329119">(Oct 23 2020 at 15:38)</a>:</h4>
<p>Ok, I think I will take a look at the project and see if I can help. Thanks!</p>



<a name="214333305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214333305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214333305">(Oct 23 2020 at 16:15)</a>:</h4>
<p>Short-term there's a Better TOML extension that knows the manifest schema.</p>



<a name="214333891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214333891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214333891">(Oct 23 2020 at 16:20)</a>:</h4>
<p>Note that when you have a wight space preserving toml library that is good we may want to use it in cargo. I know that <span class="user-mention" data-user-id="120518">@Eric Huss</span> has put a lot of work into that.</p>



<a name="214802479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Cargo.toml%20completion%20and%20formatting/near/214802479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Cargo.2Etoml.20completion.20and.20formatting.html#214802479">(Oct 28 2020 at 07:27)</a>:</h4>
<p><span class="user-mention" data-user-id="257660">@Iulian Gabriel Radu</span> I have started working on it last week. Do you want to combine efforts so that we don't duplicate?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>